/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.DesignPatterns.behavioral.mediator.conf;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.DesignPatterns.behavioral.mediator.*;

/**
 *
 * @author Nashief
 */ 
@Configurable
public class MediatorConf {
    
    Mediator mediator=new Mediator();
    float sellingIndollars=10.0f;
    @Bean 
    public Mediator mediator(){
    return new Mediator();
    } 
    @Bean 
    public DollarConverter dollarConverter(){
    return new DollarConverter(mediator);
    }
    @Bean 
    public SwedishBuyer swedishBuyer(){
    return new SwedishBuyer(mediator);
    } 
    @Bean 
    public FrenchBuyer frenchBuyer(){
    return new FrenchBuyer(mediator);
    } 
    @Bean 
    public AmericanSeller americanSeller(){
    return new AmericanSeller(mediator, sellingIndollars);
    }
    @Bean 
    public Buyer buyer(){
    return new Buyer();
    }
}
